<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/11/14 014
 * Time: 15:38
 */

namespace App\Command;


class StereoOffCommand implements Command
{
    public $stereo;

    public function __construct(Stereo $stereo)
    {
        $this->stereo = $stereo;
    }

    public function execute()
    {
        // TODO: Implement execute() method.
        $this->stereo->off();
    }

    public function undo()
    {
        // TODO: Implement execute() method.
        $this->stereo->on();
        $this->stereo->setCD();
        $this->stereo->setVolume(11);
    }
}